home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / ADSPSecure.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  3.7 KB  |  91 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ADSPSecure.a
  3. ;
  4. ;    Contains:    Secure AppleTalk Data Stream Protocol Interfaces.
  5. ;
  6. ;    Version:    Technology:    AOCE Toolbox 1.02
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__ADSPSECURE__') = 'UNDEFINED' THEN
  18. __ADSPSECURE__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__ADSP__') = 'UNDEFINED' THEN
  24.     include 'ADSP.a'
  25.     ENDIF
  26.     IF &TYPE('__OCEAUTHDIR__') = 'UNDEFINED' THEN
  27.     include 'OCEAuthDir.a'
  28.     ENDIF
  29.  
  30. ;  New ADSP control codes
  31. ;
  32. ; * open a secure connection 
  33.  
  34.  
  35. sdspOpen                        EQU        229
  36. ;For secure connections, the eom field of ioParams contains two single-bit flags
  37. ;(instead of a zero/non-zero byte). They are an encrypt flag (see below), and an
  38. ;eom flag.  All other bits in that field should be zero.
  39. ;
  40. ;To write an encrypted message, you must set an encrypt bit in the eom field of
  41. ;the ioParams of your write call. Note: this flag is only checked on the first
  42. ;write of a message (the first write on a connection, or the first write following
  43. ;a write with eom set.
  44. ;
  45.  
  46.  
  47. dspEOMBit                        EQU        0                    ; set if EOM at end of write 
  48. dspEncryptBit                    EQU        1                    ; set to encrypt message 
  49.  
  50. dspEOMMask                        EQU        $01
  51. dspEncryptMask                    EQU        $02
  52.  
  53. ;Define an ADSPSecure parameter block, as used for the secure Open call.
  54. ;
  55. ; * size of ADSPSecure workspace 
  56.  
  57.  
  58. sdspWorkSize                    EQU        2048
  59. TRSecureParams            RECORD 0
  60. localCID                 ds.w    1                ; offset: $0 (0)        ;  local connection id 
  61. remoteCID                 ds.w    1                ; offset: $2 (2)        ;  remote connection id 
  62. remoteAddress             ds        AddrBlock        ; offset: $4 (4)        ;  address of remote end 
  63. filterAddress             ds        AddrBlock        ; offset: $8 (8)        ;  address filter 
  64. sendSeq                     ds.l    1                ; offset: $C (12)        ;  local send sequence number 
  65. sendWindow                 ds.w    1                ; offset: $10 (16)        ;  send window size 
  66. recvSeq                     ds.l    1                ; offset: $12 (18)        ;  receive sequence number 
  67. attnSendSeq                 ds.l    1                ; offset: $16 (22)        ;  attention send sequence number 
  68. attnRecvSeq                 ds.l    1                ; offset: $1A (26)        ;  attention receive sequence number 
  69. ocMode                     ds.b    1                ; offset: $1E (30)        ;  open connection mode 
  70. ocInterval                 ds.b    1                ; offset: $1F (31)        ;  open connection request retry interval 
  71. ocMaximum                 ds.b    1                ; offset: $20 (32)        ;  open connection request retry maximum 
  72. secure                     ds.b    1                ; offset: $21 (33)        ;   --> TRUE if session was authenticated 
  73. sessionKey                 ds.l    1                ; offset: $22 (34)        ;  <--> encryption key for session 
  74. credentialsSize             ds.l    1                ; offset: $26 (38)        ;   --> length of credentials 
  75. credentials                 ds.l    1                ; offset: $2A (42)        ;   --> pointer to credentials 
  76. workspace                 ds.l    1                ; offset: $2E (46)        ;   --> pointer to workspace for connection align on even boundary and length = sdspWorkSize 
  77. recipient                 ds.l    1                ; offset: $32 (50)        ;   --> identity of recipient (or initiator if active mode 
  78. issueTime                 ds.l    1                ; offset: $36 (54)        ;   --> when credentials were issued 
  79. expiry                     ds.l    1                ; offset: $3A (58)        ;   --> when credentials expiry 
  80. initiator                 ds.l    1                ; offset: $3E (62)        ;  <--  RecordID of initiator returned here. Must give appropriate Buffer to hold RecordID (Only for passive or accept mode) 
  81. hasIntermediary             ds.b    1                ; offset: $42 (66)        ;  <--  will be set if credentials has an intermediary 
  82. filler1                     ds.b    1                ; offset: $43 (67)
  83. intermediary             ds.l    1                ; offset: $44 (68)        ;  <--  RecordID of intermediary returned here. (If intermediary is found in credentials Must give appropriate Buffer to hold RecordID (Only for passive or accept mode) 
  84. sizeof                     EQU *                    ; size:   $48 (72)
  85.                         ENDR
  86.  
  87.     ENDIF ; __ADSPSECURE__ 
  88.  
  89.